window.onresize = function () {
    const divs = document.getElementsByClassName('demopic');
    for (let i = 1; i < divs.length; i += 2) {
        let div = divs[i];
        let width = window.getComputedStyle(div).width;
        div.style.height = width;
        if (parseFloat(width) < 20)
            div.style.visibility = 'hidden';
        else
            div.style.visibility = 'visible';
    }
}
